package com.xwj.myobject

import com.xwj.myclass.MyConnection
import org.apache.spark.SparkContext

/**
  * Created by thinkjoy on 2017/8/9.
  * 访问spark集群
  */
object RemoteApplication {

  var spark:SparkContext=null

  def main(args: Array[String]): Unit = {
    var conc=new MyConnection()
    spark=conc.connect()
    val broadcastVar = spark.broadcast(Array(1,2,3)) //广播
    println("结果:"+broadcastVar.value(0))
  }

}
